Fix liboat_hook.so inaccessible in some device#190
Merged
JingMatrix merged 3 commits intomasterfrom Feb 17, 2025
Merged
Conversation
User has reported `dex2oat` failure with SELinux log:
W dex2oat64: type=1400 audit(0.0:922): avc: denied { read } for path="/data/adb/modules/zygisk_lsposed/bin/liboat_hook64.so" dev="dm-58" ino=91204 scontext=u:r:dex2oat:s0 tcontext=u:object_r:adb_data_file:s0 tclass=file permissive=0
1 task
Owner
Author
|
@aayushrautela try the latest CI build to see if your problem got fixed. |
Contributor
|
I think the issue is init relabels xposed_file when doing restorecon on /data, which is usually performed during ota. That's why magisk_file is often used in that dir. |
The init process may relable SELinux context, which can be prevented by marking the context xposed_file with type system_file_type. See https://cs.android.com/android/platform/superproject/main/+/main:system/sepolicy/private/init.te;l=335
Owner
Author
|
Thanks for the information, I will let users to test your conjecture. |
JingMatrix
added a commit
that referenced
this pull request
Feb 23, 2025
User has reported `dex2oat` failure with SELinux log:
```
W dex2oat64: type=1400 audit(0.0:922): avc: denied { read } for path="/data/adb/modules/zygisk_lsposed/bin/liboat_hook64.so" dev="dm-58" ino=91204 scontext=u:r:dex2oat:s0 tcontext=u:object_r:adb_data_file:s0 tclass=file permissive=0
```
Hence, we now set the SELinux context of `liboat_hook.so` in Dex2OatService.
Moreover, by the pull-request #194, we have to move `putenv` out of the if block by testing.
Indeed, if we call `putenv` inside the if block, then it is no longer valid out of the block.
MicrosoftPro12
added a commit
to MicrosoftPro12/LSPosed_private
that referenced
this pull request
Apr 20, 2025
This reverts commit bfa38b0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User has reported
dex2oatfailure with SELinux log:W dex2oat64: type=1400 audit(0.0:922): avc: denied { read } for path="/data/adb/modules/zygisk_lsposed/bin/liboat_hook64.so" dev="dm-58" ino=91204 scontext=u:r:dex2oat:s0 tcontext=u:object_r:adb_data_file:s0 tclass=file permissive=0